package com.group.sliding.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.group.sliding.domain.dto.ItemDTO;
import com.group.sliding.domain.dto.ItemFormDTO;
import com.group.sliding.domain.dto.OrderItemDTO;
import com.group.sliding.domain.po.Item;
import com.group.sliding.domain.query.ItemPageQuery;
import com.group.sliding.domain.vo.ItemVO;
import com.group.sliding.enums.ItemStatus;
import com.group.sliding.result.PageDTO;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 */
public interface IItemService extends IService<Item> {

    void updateStockAndSold(List<OrderItemDTO> items);

    List<ItemDTO> queryItemByIds(Collection<Long> ids);

    PageDTO<ItemVO> search(ItemPageQuery query);

    void saveItem(ItemFormDTO itemFormDTO);

    void updateItemStatus(Long id, ItemStatus itemStatus);

    void updateItem(ItemFormDTO itemFormDTO);
}
